package org.teameleven.quicken.factories;

import java.math.BigDecimal;

import org.teameleven.quicken.accounts.Account;

/**
 * 
 * @author Owner
 * 
 * @param <T>
 * 
 *            I am using Generics to say that this factory will use any Account
 *            type that is a child class of it.
 */
public abstract class AccountFactory<T extends Account> {
	protected abstract T createAccount();

	public T manageNewAccount(BigDecimal startingBalance) {
		T account = createAccount();
		account.setAmount(startingBalance);
		return account;
	}

}